package com.wechat.keymap;

import java.util.Map;

import com.swak.fx.support.ui.UIEditor.Keys;
import com.swak.utils.Maps;
import com.wechat.enums.Events;

import javafx.scene.input.KeyCode;

/**
 * 快捷键映射
 * 
 * @author DELL
 */
public class Keymaps {

	static final Map<Keys, Events> KeysCommands = Maps.newHashMap();

	static {
		initDefault();
	}

	static void initDefault() {
		KeysCommands.put(new Keys().keyPressed(KeyCode.ENTER), Events.Event_Send);
		KeysCommands.put(new Keys().keyPressed(KeyCode.ALT).keyPressed(KeyCode.ENTER), Events.Event_Newline);
		KeysCommands.put(new Keys().keyPressed(KeyCode.ALT_GRAPH).keyPressed(KeyCode.ENTER), Events.Event_Newline);
	}

	public static Events findKeysCommand(Keys keys) {
		return KeysCommands.get(keys);
	}
}